package com.etc.servlet.user;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@WebServlet("/user/hello.action")
public class Test2Servlet extends HttpServlet {

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		// 获取字符输出一路
//		PrintWriter pw = resp.getWriter();
		// 用于请求的转发
//		req.getRequestDispatcher("转发地址").forward(req, response);
	
		// 通知浏览器重定向
//		resp.sendRedirect("重定向地址");
		
		resp.setHeader("aaa", "bbb");
	}

	
}
